<!--
 * @Author: 1243sd 782012816@qq.com
 * @Date: 2024-03-19 21:18:26
 * @LastEditors: 1243sd 782012816@qq.com
 * @LastEditTime: 2024-03-27 22:58:26
 * @FilePath: \frontend-ykt-admin\src\views\order\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->


<!---- 预约列表 ---->
<template>
    <div class="container">
        <b-card-new>
            <b-query-form-new ref="bForm" :data="formData" :form="dataForm.query" @search="handleSearch"></b-query-form-new>
            <b-query-table ref="bTable" :init-columns="initColumns()" :data-form="dataForm"></b-query-table>
        </b-card-new>
    </div>
</template>
<script>
import mixinPageHeight from "@/mixinPageHeight"
export default {
    mixins:[mixinPageHeight],
    data() {
        return {
            formData:[
                { typeCode: "selectFilter", title: "商品名称", name: "product_id", jsName: "product", fnName: "product_list", vname: "name" },
                { typeCode: "input", title: "联系电话", name: "contact_mobile", type: "int" },
                { typeCode: "selectFilter", title: "会员名称", name: "ofa_user_id", jsName: "member", fnName: "member_list", vname: "nickname" },
                { typeCode: "datePickerRangeI", title: "预约时间", name: "reservation_time", start: "reservation_time_start", end: "reservation_time_end" },
            ],
            dataForm:{
                url:"api/product_reservation/page_list",
                query:{
                    product_id: '', // 商品id
                    contact_mobile: "", // 联系电话
                    ofa_user_id: "", // 公众号会员ID
                    reservation_time_start: "", // 预约开始时间
                    reservation_time_end: "", // 预约结束时间
                }
            }
        }
    },
    created() {
    },
    methods:{
        initColumns() {
            return [
                { title:"申请记录id", valueName:"id" },
                { title:"会员昵称", valueName:"ofa_user_nickname" },
                { title:"会员姓名", valueName:"ofa_user_real_name" },
                { title:"商品名称", valueName:"product_name" },
                { title:"联系电话", valueName:"contact_mobile" },
                { title:"预约时间", valueName:"reservation_time" },
                { title:"申请时间", valueName:"created_at" },
            ]
        }
    }
}
</script>